import urllib.request
import re
url="https://www.52pojie.cn/forum-24-1.html"
page=urllib.request.urlopen(url).read()
page=page.decode('gbk')
#print(page)
zz1=r'<tbody id="normalthread_.+?">(.+?)</tbody>'
zz_link=r'<a href="(thread-.+?)".+? class="s xst">(.+?)</a>'
#print(zz1)
#print(zz_link)
html=re.findall(zz1,page,re.S)
#print(html)
for line in html:
    html_link=re.findall(zz_link,line,re.S)
    #print(html_link)
    title=html_link[0][1]
    link=html_link[0][0]
    #print(title)
    #print(link)
    #title_naumber =0
    #print('%d、%s https://www.52pojie.cn/%s' % (title_naumber, title, link))
    print( title, 'https://www.52pojie.cn/%s'%link)


